Skip to content

fix(RBR-943/RBR-1029): AGENT_HOME must be the run's own agent home, never a foreign agent's - #28

Merged
PraeSynBH merged 1 commit into
masterfrom
rbr1029-fork-merge-clean
Aug 9, 2026
Merged

fix(RBR-943/RBR-1029): AGENT_HOME must be the run's own agent home, never a foreign agent's#28
PraeSynBH merged 1 commit into
masterfrom
rbr1029-fork-merge-clean

Conversation

@PraeSynBH

Copy link
Copy Markdown
Owner

Retarget of upstream PR paperclipai#11002 onto our fork's master. We do not have push/merge rights on paperclipai/paperclip (verified: gh api repos/paperclipai/paperclip -q .permissions -> push:false), so this ships via our fork instead per RBR-1028/RBR-1029.

Content is the exact 2-file diff from the upstream PR (execute.ts, execute.agent-home.test.ts), hand-applied cleanly on current fork/master (a straight rebase across 585 divergent commits hit unrelated conflicts elsewhere in the tree; this avoids touching anything outside the two intended files).

Verified locally this run:

  • 13/13 new tests pass (execute.agent-home.test.ts)
  • 60/60 full hermes-adapter suite passes
  • tsc --noEmit clean on the package

Closes RBR-1028, RBR-1029 (land the RBR-943 AGENT_HOME isolation fix on a real, CI-tracked master we actually control).

…ever a foreign agent's

Retarget of upstream PR paperclipai#11002 onto our fork's master (we do not have
push/merge rights on paperclipai/paperclip; verified push:false).

Re-applied the verified 2-file diff cleanly on top of current fork/master
(rebase across 585 commits hit unrelated conflicts elsewhere; hand-applied
just this diff instead, verified identical to the PR-head commit content).

13/13 new tests pass, 60/60 hermes-adapter suite passes, tsc --noEmit clean.

Root cause: execute() built the child-process AGENT_HOME from whatever the
adapter inherited or the config supplied, with no check that the value
actually belongs to the agent running this specific execution. Under
concurrent runs for different agents on the same host, one agent's run
could inherit another agent's AGENT_HOME.

Fix: resolveAgentHomeEnv() only accepts context.paperclipWorkspace.agentHome
(the heartbeat-resolved, run-scoped value) or an inherited value that can be
attributed to ctx.agent.id; anything else is dropped with a warning logged
to the run, rather than silently passed through.
@PraeSynBH
PraeSynBH merged commit e2ff408 into master Aug 9, 2026
11 of 16 checks passed
@PraeSynBH
PraeSynBH deleted the rbr1029-fork-merge-clean branch August 9, 2026 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants